How to: Calculate Weight in an Allocation Rule
The Allocation Rule is a definition of the share of the available items in the warehouse that is sent to a particular Store, Store Group, Location, Customer Group, or Customer. You can set up the shares by manually filling the Weight field. Additionally, the system provides a functionality to calculate the Weight field based on historical sales data or store size.
To calculate the Weight field manually
- Click the icon, enter Allocation Rule List, and select the relevant link.
- Create a new Allocation Rule, or select an existing Allocation Rule from the list.
- On the Allocation Rule page, open the Calculation FastTab.
- Select an Allocation Rule Calculation in the Rule Calculation Code field.
Other fields on this FastTab will be updated based on your selection. - Click the Calculate action.
The system re-calculates the Weight and % Share fields in all lines based on the selected Allocation Rule Calculation.
To calculate the Weight field with Scheduler
On the Allocation Rule Page:
- Click the icon, enter Allocation Rule List, and select the relevant link.
- Create a new Allocation Rule, or select an existing Allocation Rule from the list.
- On the Allocation Rule page, open the Calculation FastTab.
- Select an Allocation Rule Calculation in the Rule Calculation Code field.
Other fields in this FastTab will be updated based on your selection. - Set the Run Frequency field to a value other than Run Manually.
On the Scheduler Job page:
- Click the icon, enter Scheduler Job List, and select the relevant link.
- Create a new Scheduler Job, or select the Scheduler Job with Job ID of REPLENALLOCATION from the list.
- In the Object Setup FastTab, set the Object Type field to Codeunit.
- Set the Object No. field to 10012217.
- Set the calculation frequency in the Schedule Details FastTab. This job is usually calculated on a daily or weekly basis.
The Scheduler job will perform the same calculation as the Calculate action.
To set up an Allocation Rule Calculation
The Allocation Rule Calculation defines how the Weight field is recalculated. You can access the Allocation Rule Calculation by doing a lookup in the Rule Calculation Code field on the Allocation Rule page.
- Create a new Allocation Rule Calculation.
- Fill in the fields as described in the following table:
Field | Description |
---|---|
Code | This field specifies a unique identifier for the Allocation Rule Calculation. |
Codeunit No. | This field specifies the codeunit that is used to calculate the Allocation Rule Calculation. Codeunits provided by LS Retail:
Codeunit 10012218 calculates the weight based on the Quantity Sold. Any set filters on Item or Date level are considered in the calculation. The Turnover is calculated via the Valued Quantity field from the Value Entry table. Codeunit 10012219 calculates the weight based on the Store Floor Area, which is set up on the Store Sections in the Section Size field. Any set filters on Item or Date level are ignored. Codeunit 10012220 calculates the weight based on the Turnover. Any set filters on Item or Date level are considered in the calculation. The Turnover is calculated via the Sales Amount (Actual) field from the Value Entry table. |
Description | This field specifies the description of the Allocation Rule Calculation. |
Item Division Code
Item Category Code Product Group Code Item No. |
This field specifies the Item-based filters for the calculation. These filters are only considered in the calculation Codeunits 10012218 and 10012220. |
Date Calculation Type | This field specifies which Date-based filter should be used. The options are:
When you select the option Date, the fields Starting Date and Ending Date are considered as Date-based filters. When the option Date Formula is selected, the fields Date Formula for Start Date and Date Formula for End Date are considered as Date-based filters. |
Date Formula for Start Date
Date Formula for End Date |
Here you can specify a Date-based filter by using Date Formulas, like 1Y, CY-1M, and so on. |
Starting Date
Ending Date |
Here you can specify a Date-based filter by using Date values, like 01.01.2020, 31.12.2020, and so on. |
See Also
How to: Add Stores to Allocation Rule from Store Hierarchy